//
//  BaseViewController.m
//  MemberProject
//
//  Created by MAC OS X on 15/4/1.
//  Copyright (c) 2015年 MAC OS X. All rights reserved.
//

#import "BaseViewController.h"
#import "BaseViewController+Style.h"
#import "KxMenu.h"
#import "SignInputViewController.h"
#import "BaseNavigationController.h"
@interface BaseViewController ()
@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark 导航栏题目
-(void)titleWithLabel:(NSString *)title andColor:(UIColor *)color
{
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 180, 20)];
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:19];
    if (color) {
        label.textColor = color;
    }else
        label.textColor = [UIColor whiteColor];
    label.text = title;
    self.navigationItem.titleView = label;
}
#pragma mark 自定义返回
-(void)addBack
{
    UIButton *backBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 40, 25)];
    [backBtn setTitle:@"返回" forState:0];
    [backBtn addTarget:self action:@selector(popBack) forControlEvents:64];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:backBtn];
}
#pragma mark 将多余的留白
- (void)setExtraCellLineHidden: (UITableView *)tableView{
    
    UIView *view =[ [UIView alloc]initWithFrame:CGRectZero];
    
    view.backgroundColor = [UIColor clearColor];
    
    [tableView setTableFooterView:view];
    
    [tableView setTableHeaderView:view];
}
#pragma mark 扫一扫
-(void)showQz:(NSInteger)style
{
    [self showQzStyle:style];
}
-(void)showQzFromLibrary
{
    [self showQzFromLibraryStyle];
}
-(void)getZBarPushBlockStr:(CSResultBlock)result
{
    
    [self getZBarPushBlockStrStyle:^(NSString *str) {
        result(str);
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
